import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' //     "@vitejs/plugin-vue": "^1.2.1",
import path from 'path'

export default defineConfig({
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
      com: path.resolve(__dirname, 'src/components')
    }
  },
  base: '/',
  plugins: [vue()],
  server: {
    host: '0.0.0.0',
    port: 8888,
    proxy: {
      '/api': {
        //target: 'http://127.0.0.1:9000',	
        target: 'http://127.0.0.1:7001',	
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
    }
  } 
})
